]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
popupMenu: Ungrab when removing active menu
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 28 Jul 2020 15:50:58 +0000 (17:50 +0200)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Wed, 29 Jul 2020 19:40:54 +0000 (19:40 +0000)
While we do have some handling for removing the active menu, it has
been a no-op for years. The bit that we really care about from the
PopupMenuManager's point of view is the existing grab though. Drop
that instead of calling _closeMenu() directly; ungrabbing will still
call the method indirectly, and it will still be a no-op :-)

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3022

js/ui/popupMenu.js

index 222dbe9c49fe443192e48510343d4148ceb601c9..6d15261fd214cf4e6a101540bc67608c614ab982 100644 (file)
@@ -1325,7 +1325,7 @@ var PopupMenuManager = class {
 
     removeMenu(menu) {
         if (menu == this.activeMenu)
-            this._closeMenu(false, menu);
+            this._grabHelper.ungrab({ actor: menu.actor });
 
         let position = this._findMenu(menu);
         if (position == -1) // not a menu we manage